Primes in Arithmetic Progressions

Introduction

Arithmetic Progressions and the Form $4k+1$

Why This Question Matters

A Quick Review of Modular Arithmetic

First Observations and Small Examples

Patterns in Primes: What We Can and Cannot See

The Role of Quadratic Residues

A Glimpse of Dirichlet’s Theorem

How Mathematicians Prove Infinitude in Progressions

Without going into heavy machinery, here are the broad ideas:

For the special case of $4k+1$:

Consequences and Applications

Summary

Exercises

  1. Classify primes: List all primes below $200$ and classify them as $4k+1$ or $4k+3$.

    Solution

    • Primes below $200$ $$2,3,5,7,11,13,17,19,23,29,31,37,41,43,47,53,59,61,67,71,73,79,83,89,97,101,103,107,109,113,127,131,137,139,149,151,157,163,167,173,179,181,191,193,197,199$$
    • Of the form $4k+1$ (remainder $1$ mod $4$): $$5,13,17,29,37,41,53,61,73,89,97,101,109,113,137,149,157,173,181,193$$
    • Of the form $4k+3$ (remainder $3$ mod $4$): $$3,7,11,19,23,31,43,47,59,67,71,79,83,103,107,127,131,139,151,163,167,179,191,197,199$$
    • Note: $2$ is even, so it does not fit $4k+1$ or $4k+3$.
  2. Modular practice: Compute the remainder of the following numbers mod $4$:
    $57, 98, 123, 201, 314$.

    Solution

    Compute $n \bmod 4$:

    • $57$:
      $56$ is divisible by $4$, so $57 \equiv 1 \pmod{4}$.
    • $98$:
      $96$ is divisible by $4$, so $98 \equiv 2 \pmod{4}$.
    • $123$:
      $120$ is divisible by $4$, so $123 \equiv 3 \pmod{4}$.
    • $201$:
      $200$ is divisible by $4$, so $201 \equiv 1 \pmod{4}$.
    • $314$:
      $312$ is divisible by $4$, so $314 \equiv 2 \pmod{4}$.
  3. Quadratic residues mod $4$: Verify that the only quadratic residues mod $4$ are $0$ and $1$.

    Solution

    Compute $x^2 \bmod 4$ for $x=0,1,2,3$:

    • $x=0$: $0^2 = 0 \equiv 0 \pmod{4}$
    • $x=1$: $1^2 = 1 \equiv 1 \pmod{4}$
    • $x=2$: $2^2 = 4 \equiv 0 \pmod{4}$
    • $x=3$: $3^2 = 9 \equiv 1 \pmod{4}$

    So the only possible square remainders mod $4$ are $0$ and $1$.
    Therefore, the quadratic residues mod $4$ are exactly $0$ and $1$.

  4. Exploring $x^2 \equiv -1 \pmod{p}$: For $p=5, 13, 17$, find an $x$ such that $x^2 \equiv -1 \pmod{p}$.

    Solution

    We want $x^2 \equiv -1 \pmod{p}$, i.e. $x^2 \equiv p-1 \pmod{p}$.

    • For $p=5$:
      We need $x^2 \equiv 4 \pmod{5}$.
      • $2^2 = 4 \equiv 4 \pmod{5}$
      • $3^2 = 9 \equiv 4 \pmod{5}$
      So $x \equiv 2,3 \pmod{5}$ are solutions.
    • For $p=13$:
      We need $x^2 \equiv 12 \pmod{13}$.
      Try small $x$:
      • $5^2 = 25 \equiv 12 \pmod{13}$
      • $8^2 = 64 \equiv 12 \pmod{13}$
      So $x \equiv 5,8 \pmod{13}$ are solutions.
    • For $p=17$:
      We need $x^2 \equiv 16 \pmod{17}$.
      • $4^2 = 16 \equiv 16 \pmod{17}$
      • $13^2 = 169 \equiv 16 \pmod{17}$
      So $x \equiv 4,13 \pmod{17}$ are solutions.
  5. Prime hunting: Find the next five primes of the form $4k+1$ after $100$.

    Solution

    Check primes greater than $100$ and test $p \bmod 4$:

    • $101 \equiv 1 \pmod{4}$
    • $103 \equiv 3 \pmod{4}$
    • $107 \equiv 3 \pmod{4}$
    • $109 \equiv 1 \pmod{4}$
    • $113 \equiv 1 \pmod{4}$
    • $127 \equiv 3 \pmod{4}$
    • $131 \equiv 3 \pmod{4}$
    • $137 \equiv 1 \pmod{4}$
    • $139 \equiv 3 \pmod{4}$
    • $149 \equiv 1 \pmod{4}$
    • First five primes of the form $4k+1$ after $100$:
      $101, 109, 113, 137, 149$.
  6. Arithmetic progressions: Write the first ten terms of the progression $7 + 6k$.
    Which of them are prime?

    Solution

    The progression is $a_k = 7 + 6k$ for $k=0,1,2,\dots$

    • First ten terms:
      • $k=0$: $7$
      • $k=1$: $13$
      • $k=2$: $19$
      • $k=3$: $25$
      • $k=4$: $31$
      • $k=5$: $37$
      • $k=6$: $43$
      • $k=7$: $49$
      • $k=8$: $55$
      • $k=9$: $61$
    • Check primality:
      • $7$ — prime
      • $13$ — prime
      • $19$ — prime
      • $25 = 5^2$ — not prime
      • $31$ — prime
      • $37$ — prime
      • $43$ — prime
      • $49 = 7^2$ — not prime
      • $55 = 5 \cdot 11$ — not prime
      • $61$ — prime
    • Primes among them:
      $7, 13, 19, 31, 37, 43, 61$.
  7. Coprimality check: For each pair $(a,d)$ below, determine whether $\gcd(a,d)=1$:
    $(2,4)$, $(3,8)$, $(5,6)$, $(7,9)$.

    Solution

    Compute $\gcd(a,d)$ for each pair:

    • $(2,4)$:
      $\gcd(2,4) = 2$ → not coprime.
    • $(3,8)$:
      $\gcd(3,8) = 1$ → coprime.
    • $(5,6)$:
      $\gcd(5,6) = 1$ → coprime.
    • $(7,9)$:
      $\gcd(7,9) = 1$ → coprime.

    So only $(2,4)$ is not coprime; the others are.

  8. Exploration question: Why do you think the condition $\gcd(a,d)=1$ is necessary in Dirichlet’s theorem?
    Give an intuitive explanation.

    Solution

    • Key idea:
      If $a$ and $d$ share a common factor $g>1$, then every term in the progression $$a,\, a+d,\, a+2d,\, a+3d,\dots$$ is divisible by $g$.
    • Consequences:
      • All terms are multiples of $g$.
      • The only possible prime in the progression would be $g$ itself (if it appears).
      • After that, every term is composite (since it has $g$ as a factor).
    • Conclusion:
      To have infinitely many primes in the progression, we must avoid this “built‑in” factor.
      That is exactly what $\gcd(a,d)=1$ guarantees.
  9. Gaussian integers (optional challenge): Show that $5 = (2+i)(2-i)$ in $\mathbb{Z}[i]$.
    Try the same for $13$.

    Solution

    We work in $\mathbb{Z}[i] = \{a+bi : a,b \in \mathbb{Z}\}$.

    • Show $5 = (2+i)(2-i)$:
      • Compute: $$(2+i)(2-i) = 2\cdot 2 - 2i + 2i - i^2 = 4 - (-1) = 5.$$
      • So $5$ factors as claimed.
    • Try the same for $13$:
      • Look for $a,b$ such that $$(a+bi)(a-bi) = a^2 + b^2 = 13.$$
      • Pairs $(a,b)$ with $a^2 + b^2 = 13$:
        • $2^2 + 3^2 = 4 + 9 = 13$.
      • So: $$(2+3i)(2-3i) = 4 + 9 = 13.$$
    • Conclusion:
      • $5 = (2+i)(2-i)$ in $\mathbb{Z}[i]$
      • $13 = (2+3i)(2-3i)$ in $\mathbb{Z}[i]$
      Both are primes of the form $4k+1$ in $\mathbb{Z}$ and factor in $\mathbb{Z}[i]$.